package jonggyuni.basic;

public class J13_Q77_Books_OOP {

	public static void main(String[] args) {
		J13_Book book =
				new J13_Book(12345, "누구나 알기 쉬운", "혜지원", 
						"키와바 타케시", "미스테리","25000", false, "2014-06-10");
	
		J13_Book[] books = new J13_Book[5];
		books[0] = book;
		J13_Member member =	new J13_Member(9875,"수지", "123-456-789", books , 12345);

		System.out.println(book.toString());
		
	}//main

}//class


class J13_Book{//도서 관련 class
	private int bookNo;
	private String bookName;
	private String pub;
	private String author;
	private String genre;
	private String price;
	
	boolean isRent;
	String regDate;
	
	public J13_Book(){}
	public J13_Book(int bookNo, String bookName, String pub, 
			String author, String genre, String price, boolean isRent, String regDate){
		this.bookNo = bookNo;
		this.bookName = bookName;
		this.pub = pub;
		this.author = author;
		this.genre = genre;
		this.price = price;
		this.regDate = regDate;
		
	}
	
	@Override
		public String toString() {
			String bookinfo ="도서명 : "+bookName;
			bookinfo +="출판사 : "+pub;
			return bookinfo;
		}
	
}//class Book


class J13_Member{
	private int memberNo;
	private String name;
	private String telNo;
	private J13_Book[] rbooks;//대여중인 책, 
	  //클래스 개념을 이용해서 도서에 관련된 모든 내용을 불러온다. 변수를 그룹화
	private int mileage;   
	
	public J13_Member(){}
	public J13_Member(int memberNo, String name, String telNo,
			J13_Book[] rbooks, int mileage){
		this.memberNo = memberNo;
		this.name = name;
		this.telNo = telNo;
		this.rbooks = rbooks;		
	}
						 	 

	
	
}//class Member













